//package cn.bone.chapter02;
//
//import com.sun.net.ssl.internal.ssl.Provider;
//import sun.misc.Launcher;
//import sun.security.ec.CurveDB;
//
//import java.net.URL;
//
//public class ClassLoaderTest1 {
//
//    public static void main(String... args){
//
//        System.out.println("========启动类加载器========");
//
//        // 获取BootstrapClassLoader能够加载的api的路径
//
///*
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/resources.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/rt.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/sunrsasign.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/jsse.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/jce.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/charsets.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/lib/jfr.jar
//file:/E:/soft/Java/jdk1.8.0_161/jre/classes
//*/
//        URL[] urLs = Launcher.getBootstrapClassPath().getURLs();
//        for(URL url : urLs){
//            System.out.println(url.toExternalForm());
//        }
//
//
//        // 从上面的路径中随意选择一个类，来看看它的类加载器是什么: 打印为null，表示是引导类加载器
//        ClassLoader classLoader1 = Provider.class.getClassLoader();
//        System.out.println(classLoader1);
//
//
//
///*
//========扩展类加载器========
//E:\soft\Java\jdk1.8.0_161\jre\lib\ext
//C:\Windows\Sun\Java\lib\ext
// */
//
//        System.out.println("========扩展类加载器========");
//        String extDirs = System.getProperty("java.ext.dirs");
//        for(String path : extDirs.split(";")){
//            System.out.println(path);
//        }
//
//        // 从上面的路径中随意选择一个类，来看看它的类加载器是什么: 打印为null，表示是引导类加载器
//        ClassLoader classLoader2 = CurveDB.class.getClassLoader();
//        // sun.misc.Launcher$ExtClassLoader@29453f44
//        System.out.println(classLoader2);
//    }
//}
